<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Binary descriptors for lines extracted from an image</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Binary descriptors for lines extracted from an image</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d83/classcv_1_1line__descriptor_1_1BinaryDescriptor.html">cv::line_descriptor::BinaryDescriptor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Class implements both functionalities for detection of lines and computation of their binary descriptor.  <a href="../../d6/d83/classcv_1_1line__descriptor_1_1BinaryDescriptor.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/dde/classcv_1_1line__descriptor_1_1BinaryDescriptorMatcher.html">cv::line_descriptor::BinaryDescriptorMatcher</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">furnishes all functionalities for querying a dataset provided by user or internal to class (that user must, anyway, populate) on the model of <a class="el" href="../../d8/d9b/group__features2d__match.html">Descriptor Matchers</a>  <a href="../../d2/dde/classcv_1_1line__descriptor_1_1BinaryDescriptorMatcher.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d6f/structcv_1_1line__descriptor_1_1DrawLinesMatchesFlags.html">cv::line_descriptor::DrawLinesMatchesFlags</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/dd7/structcv_1_1line__descriptor_1_1KeyLine.html">cv::line_descriptor::KeyLine</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A class to represent a line.  <a href="../../d1/dd7/structcv_1_1line__descriptor_1_1KeyLine.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/dbd/classcv_1_1line__descriptor_1_1LSDDetector.html">cv::line_descriptor::LSDDetector</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d03/structcv_1_1line__descriptor_1_1LSDParam.html">cv::line_descriptor::LSDParam</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5e8cbc3c61c763a03474ce02141ce7e4"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/ddd/group__line__descriptor.html#ga5e8cbc3c61c763a03474ce02141ce7e4">cv::line_descriptor::drawKeylines</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;image, const std::vector&lt; <a class="el" href="../../d1/dd7/structcv_1_1line__descriptor_1_1KeyLine.html">KeyLine</a> &gt; &amp;keylines, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;outImage, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;color=<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1), int flags=<a class="el" href="../../d8/d6f/structcv_1_1line__descriptor_1_1DrawLinesMatchesFlags.html#a2396cadbfb2ca58057df921aa138f9b3a2e8e234416ae60a082f9078f3b4ff083">DrawLinesMatchesFlags::DEFAULT</a>)</td></tr>
<tr class="memdesc:ga5e8cbc3c61c763a03474ce02141ce7e4"><td class="mdescLeft"> </td><td class="mdescRight">Draws keylines.  <a href="../../dc/ddd/group__line__descriptor.html#ga5e8cbc3c61c763a03474ce02141ce7e4">More...</a><br/></td></tr>
<tr class="separator:ga5e8cbc3c61c763a03474ce02141ce7e4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga01e43c974ddb735d39dd7124499f40ab"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/ddd/group__line__descriptor.html#ga01e43c974ddb735d39dd7124499f40ab">cv::line_descriptor::drawLineMatches</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;img1, const std::vector&lt; <a class="el" href="../../d1/dd7/structcv_1_1line__descriptor_1_1KeyLine.html">KeyLine</a> &gt; &amp;keylines1, const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;img2, const std::vector&lt; <a class="el" href="../../d1/dd7/structcv_1_1line__descriptor_1_1KeyLine.html">KeyLine</a> &gt; &amp;keylines2, const std::vector&lt; <a class="el" href="../../d4/de0/classcv_1_1DMatch.html">DMatch</a> &gt; &amp;matches1to2, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;outImg, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;matchColor=<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1), const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;singleLineColor=<a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1), const std::vector&lt; char &gt; &amp;matchesMask=std::vector&lt; char &gt;(), int flags=<a class="el" href="../../d8/d6f/structcv_1_1line__descriptor_1_1DrawLinesMatchesFlags.html#a2396cadbfb2ca58057df921aa138f9b3a2e8e234416ae60a082f9078f3b4ff083">DrawLinesMatchesFlags::DEFAULT</a>)</td></tr>
<tr class="memdesc:ga01e43c974ddb735d39dd7124499f40ab"><td class="mdescLeft"> </td><td class="mdescRight">Draws the found matches of keylines from two images.  <a href="../../dc/ddd/group__line__descriptor.html#ga01e43c974ddb735d39dd7124499f40ab">More...</a><br/></td></tr>
<tr class="separator:ga01e43c974ddb735d39dd7124499f40ab"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2>Introduction </h2>
<p>One of the most challenging activities in computer vision is the extraction of useful information from a given image. Such information, usually comes in the form of points that preserve some kind of property (for instance, they are scale-invariant) and are actually representative of input image.</p>
<p>The goal of this module is seeking a new kind of representative information inside an image and providing the functionalities for its extraction and representation. In particular, differently from previous methods for detection of relevant elements inside an image, lines are extracted in place of points; a new class is defined ad hoc to summarize a line's properties, for reuse and plotting purposes.</p>
<h2>Computation of binary descriptors </h2>
<p>To obtatin a binary descriptor representing a certain line detected from a certain octave of an image, we first compute a non-binary descriptor as described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_LBD">[290]</a> . Such algorithm works on lines extracted using EDLine detector, as explained in <a class="el" href="../../d0/de3/citelist.html#CITEREF_EDL">[264]</a> . Given a line, we consider a rectangular region centered at it and called <em>line support region (LSR)</em>. Such region is divided into a set of bands \(\{B_1, B_2, ..., B_m\}\), whose length equals the one of line.</p>
<p>If we indicate with \(\bf{d}_L\) the direction of line, the orthogonal and clockwise direction to line \(\bf{d}_{\perp}\) can be determined; these two directions, are used to construct a reference frame centered in the middle point of line. The gradients of pixels \(\bf{g'}\) inside LSR can be projected to the newly determined frame, obtaining their local equivalent \(\bf{g'} = (\bf{g}^T \cdot \bf{d}_{\perp}, \bf{g}^T \cdot \bf{d}_L)^T \triangleq (\bf{g'}_{d_{\perp}}, \bf{g'}_{d_L})^T\).</p>
<p>Later on, a Gaussian function is applied to all LSR's pixels along \(\bf{d}_\perp\) direction; first, we assign a global weighting coefficient \(f_g(i) = (1/\sqrt{2\pi}\sigma_g)e^{-d^2_i/2\sigma^2_g}\) to i*-th row in LSR, where \(d_i\) is the distance of <em>i</em>-th row from the center row in LSR, \(\sigma_g = 0.5(m \cdot w - 1)\) and \(w\) is the width of bands (the same for every band). Secondly, considering a band \(B_j\) and its neighbor bands \(B_{j-1}, B_{j+1}\), we assign a local weighting \(F_l(k) = (1/\sqrt{2\pi}\sigma_l)e^{-d'^2_k/2\sigma_l^2}\), where \(d'_k\) is the distance of <em>k</em>-th row from the center row in \(B_j\) and \(\sigma_l = w\). Using the global and local weights, we obtain, at the same time, the reduction of role played by gradients far from line and of boundary effect, respectively.</p>
<p>Each band \(B_j\) in LSR has an associated <em>band descriptor(BD)</em> which is computed considering previous and next band (top and bottom bands are ignored when computing descriptor for first and last band). Once each band has been assignen its BD, the LBD descriptor of line is simply given by</p>
<p class="formulaDsp">
\[LBD = (BD_1^T, BD_2^T, ... , BD^T_m)^T.\]
</p>
<p>To compute a band descriptor \(B_j\), each <em>k</em>-th row in it is considered and the gradients in such row are accumulated:</p>
<p class="formulaDsp">
\[\begin{matrix} \bf{V1}^k_j = \lambda \sum\limits_{\bf{g}'_{d_\perp}&gt;0}\bf{g}'_{d_\perp}, &amp; \bf{V2}^k_j = \lambda \sum\limits_{\bf{g}'_{d_\perp}&lt;0} -\bf{g}'_{d_\perp}, \\ \bf{V3}^k_j = \lambda \sum\limits_{\bf{g}'_{d_L}&gt;0}\bf{g}'_{d_L}, &amp; \bf{V4}^k_j = \lambda \sum\limits_{\bf{g}'_{d_L}&lt;0} -\bf{g}'_{d_L}\end{matrix}.\]
</p>
<p>with \(\lambda = f_g(k)f_l(k)\).</p>
<p>By stacking previous results, we obtain the <em>band description matrix (BDM)</em></p>
<p class="formulaDsp">
\[BDM_j = \left(\begin{matrix} \bf{V1}_j^1 &amp; \bf{V1}_j^2 &amp; \ldots &amp; \bf{V1}_j^n \\ \bf{V2}_j^1 &amp; \bf{V2}_j^2 &amp; \ldots &amp; \bf{V2}_j^n \\ \bf{V3}_j^1 &amp; \bf{V3}_j^2 &amp; \ldots &amp; \bf{V3}_j^n \\ \bf{V4}_j^1 &amp; \bf{V4}_j^2 &amp; \ldots &amp; \bf{V4}_j^n \end{matrix} \right) \in \mathbb{R}^{4\times n},\]
</p>
<p>with \(n\) the number of rows in band \(B_j\):</p>
<p class="formulaDsp">
\[n = \begin{cases} 2w, &amp; j = 1||m; \\ 3w, &amp; \mbox{else}. \end{cases}\]
</p>
<p>Each \(BD_j\) can be obtained using the standard deviation vector \(S_j\) and mean vector \(M_j\) of \(BDM_J\). Thus, finally:</p>
<p class="formulaDsp">
\[LBD = (M_1^T, S_1^T, M_2^T, S_2^T, \ldots, M_m^T, S_m^T)^T \in \mathbb{R}^{8m}\]
</p>
<p>Once the LBD has been obtained, it must be converted into a binary form. For such purpose, we consider 32 possible pairs of BD inside it; each couple of BD is compared bit by bit and comparison generates an 8 bit string. Concatenating 32 comparison strings, we get the 256-bit final binary representation of a single LBD. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga5e8cbc3c61c763a03474ce02141ce7e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5e8cbc3c61c763a03474ce02141ce7e4">◆ </a></span>drawKeylines()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::line_descriptor::drawKeylines </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/dd7/structcv_1_1line__descriptor_1_1KeyLine.html">KeyLine</a> &gt; &amp; </td>
          <td class="paramname"><em>keylines</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>outImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>color</em> = <code><a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="../../d8/d6f/structcv_1_1line__descriptor_1_1DrawLinesMatchesFlags.html#a2396cadbfb2ca58057df921aa138f9b3a2e8e234416ae60a082f9078f3b4ff083">DrawLinesMatchesFlags::DEFAULT</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>outImage</td><td>=</td><td>cv.line_descriptor.drawKeylines(</td><td class="paramname">image, keylines[, outImage[, color[, flags]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/d82/line__descriptor_2include_2opencv2_2line__descriptor_2descriptor_8hpp.html">opencv2/line_descriptor/descriptor.hpp</a>&gt;</code></p>
<p>Draws keylines. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>input image </td></tr>
    <tr><td class="paramname">keylines</td><td>keylines to be drawn </td></tr>
    <tr><td class="paramname">outImage</td><td>output image to draw on </td></tr>
    <tr><td class="paramname">color</td><td>color of lines to be drawn (if set to defaul value, color is chosen randomly) </td></tr>
    <tr><td class="paramname">flags</td><td>drawing flags </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga01e43c974ddb735d39dd7124499f40ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga01e43c974ddb735d39dd7124499f40ab">◆ </a></span>drawLineMatches()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::line_descriptor::drawLineMatches </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>img1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/dd7/structcv_1_1line__descriptor_1_1KeyLine.html">KeyLine</a> &gt; &amp; </td>
          <td class="paramname"><em>keylines1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>img2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/dd7/structcv_1_1line__descriptor_1_1KeyLine.html">KeyLine</a> &gt; &amp; </td>
          <td class="paramname"><em>keylines2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d4/de0/classcv_1_1DMatch.html">DMatch</a> &gt; &amp; </td>
          <td class="paramname"><em>matches1to2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>outImg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>matchColor</em> = <code><a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>singleLineColor</em> = <code><a class="el" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(-1)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; char &gt; &amp; </td>
          <td class="paramname"><em>matchesMask</em> = <code>std::vector&lt; char &gt;()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="../../d8/d6f/structcv_1_1line__descriptor_1_1DrawLinesMatchesFlags.html#a2396cadbfb2ca58057df921aa138f9b3a2e8e234416ae60a082f9078f3b4ff083">DrawLinesMatchesFlags::DEFAULT</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>outImg</td><td>=</td><td>cv.line_descriptor.drawLineMatches(</td><td class="paramname">img1, keylines1, img2, keylines2, matches1to2[, outImg[, matchColor[, singleLineColor[, matchesMask[, flags]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/d82/line__descriptor_2include_2opencv2_2line__descriptor_2descriptor_8hpp.html">opencv2/line_descriptor/descriptor.hpp</a>&gt;</code></p>
<p>Draws the found matches of keylines from two images. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img1</td><td>first image </td></tr>
    <tr><td class="paramname">keylines1</td><td>keylines extracted from first image </td></tr>
    <tr><td class="paramname">img2</td><td>second image </td></tr>
    <tr><td class="paramname">keylines2</td><td>keylines extracted from second image </td></tr>
    <tr><td class="paramname">matches1to2</td><td>vector of matches </td></tr>
    <tr><td class="paramname">outImg</td><td>output matrix to draw on </td></tr>
    <tr><td class="paramname">matchColor</td><td>drawing color for matches (chosen randomly in case of default value) </td></tr>
    <tr><td class="paramname">singleLineColor</td><td>drawing color for keylines (chosen randomly in case of default value) </td></tr>
    <tr><td class="paramname">matchesMask</td><td>mask to indicate which matches must be drawn </td></tr>
    <tr><td class="paramname">flags</td><td>drawing flags, see <a class="el" href="../../d8/d6f/structcv_1_1line__descriptor_1_1DrawLinesMatchesFlags.html">DrawLinesMatchesFlags</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>If both <em>matchColor</em> and <em>singleLineColor</em> are set to their default values, function draws matched lines and line connecting them with same color </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
